<form class="form-horizontal" id="form-edit-user">

    <div class="form-group">
        <label class="control-label col-xs-2">
            邀请人：
        </label>
        <div class="col-xs-9">
            {if condition="$info.parent_id > 0"}
            <input type="text" value="{$info.parent_id|get_user_mobile}【ID：{$info.parent_id}】" readonly class="form-control" >
            {else/}
            <input type="text" value="无" readonly class="form-control" >
            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            手机号
        </label>
        <div class="col-xs-9">
            <input type="number" value="{$info.mobile}" readonly class="form-control" name="mobile">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            昵称
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.nick_name}" class="form-control" name="nick_name" placeholder="请输入昵称" required>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            会员类型
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            {foreach $brand_list as $k=>$v}
            <label class="checkbox-inline"><input type="checkbox" name="brand_id[]" value="{$k}" {if in_array($k, $brand_list_checked)}checked{/if}>{$v}</label>
            {/foreach}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            登录密码
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="password" placeholder="登录密码，不修改请留空" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            头像
        </label>
        <div class="col-xs-9">
            {include file="public/singleImageUploader" uploader-name="avatar" /}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            连续签到
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.continuous_sign} 天" readonly class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            最后签到时间
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.last_sign_time|show_datetime}" readonly class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            登录天数
        </label>
        <div class="col-xs-9">
            <input type="text" value="{$info.login_days} 天" readonly class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            是否拉黑
        </label>
        <div class="col-xs-9">
            <div class="btn-group" data-toggle="buttons">
                <label class="btn btn-default {if condition='$info.in_blacklist'}active{/if}">
                    <input type="radio" name="in_blacklist" id="in_blacklist_1" {if condition='$info.in_blacklist'}checked{/if} value="1">
                    拉黑
                </label>
                <label class="btn btn-default {if condition='!$info.in_blacklist'}active{/if}">
                    <input type="radio" name="in_blacklist" id="in_blacklist_0" value="0" {if condition='!$info.in_blacklist'}checked{/if}>
                    正常
                </label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">确认编辑</button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("#form-edit-user").validate({
            messages:
                {
                    mobile:"请填写手机号",
                    nick_name:"请填写昵称",
                },
            debug: true,
            submitHandler: function () {
                ajaxSubmit('form-edit-user', true);
            }
        });
    })
</script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {

    });
</script>